/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package agenda.calendario;

import framework.groups.Item;
import javax.swing.JOptionPane;

/**
 *
 * @author Sergio Carlos Peres
 */
public class CompromissoStrategy extends framework.groups.NavieGroupManager {
    @Override
    public boolean addItem(Item m)
    {
        Integer id = m.getIdentifier();
        if (id == null)
        {
            JOptionPane.showMessageDialog(null, "Selecione um grupo");
            return false;
        }
        return agenda.calendario.DAL.CompromissoItemDB.add(((agenda.calendario.Compromisso)m));
    }
    
    @Override
    public boolean alterarItem(Item m)
    {
        return agenda.calendario.DAL.CompromissoItemDB.update(m);
    }
}
